package com.care.mall.server.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.care.mall.server.mapper.MallBusinessMapper;
import com.care.mall.common.domain.MallBusiness;
import com.care.mall.server.service.IMallBusinessService;

/**
 * 商家信息Service业务层处理
 *
 * @author 李光耀负责
 * @date 2024-03-27
 */
@Service
public class MallBusinessServiceImpl implements IMallBusinessService
{
    @Autowired
    private MallBusinessMapper mallBusinessMapper;

    /**
     * 查询商家信息
     *
     * @param businessId 商家信息主键
     * @return 商家信息
     */
    @Override
    public MallBusiness selectMallBusinessByBusinessId(Long businessId)
    {
        return mallBusinessMapper.selectMallBusinessByBusinessId(businessId);
    }

    /**
     * 查询商家信息列表
     *
     * @param mallBusiness 商家信息
     * @return 商家信息
     */
    @Override
    public List<MallBusiness> selectMallBusinessList(MallBusiness mallBusiness)
    {
        return mallBusinessMapper.selectMallBusinessList(mallBusiness);
    }

    /**
     * 新增商家信息
     *
     * @param mallBusiness 商家信息
     * @return 结果
     */
    @Override
    public int insertMallBusiness(MallBusiness mallBusiness)
    {
        return mallBusinessMapper.insertMallBusiness(mallBusiness);
    }

    /**
     * 修改商家信息
     *
     * @param mallBusiness 商家信息
     * @return 结果
     */
    @Override
    public int updateMallBusiness(MallBusiness mallBusiness)
    {
        return mallBusinessMapper.updateMallBusiness(mallBusiness);
    }

    /**
     * 批量删除商家信息
     *
     * @param businessIds 需要删除的商家信息主键
     * @return 结果
     */
    @Override
    public int deleteMallBusinessByBusinessIds(Long[] businessIds)
    {
        return mallBusinessMapper.deleteMallBusinessByBusinessIds(businessIds);
    }

    /**
     * 删除商家信息信息
     *
     * @param businessId 商家信息主键
     * @return 结果
     */
    @Override
    public int deleteMallBusinessByBusinessId(Long businessId)
    {
        return mallBusinessMapper.deleteMallBusinessByBusinessId(businessId);
    }
}
